#ifndef COMPILER_ONLINE
#include "header.cpp"
#endif

void Test1() {
    int ret = Solution().lengthOfLongestSubstring("abcabcbb");
    if (ret == 3) {
        std::cout << "Test1 ok!" << std::endl;
    } else {
        std::cout << "Test1 failed! input: \"abcabcbb\", output expected 3, actual " << ret << std::endl;
    }
}

void Test2() {
    int ret = Solution().lengthOfLongestSubstring("bbbbb");
    if (ret == 1) {
        std::cout << "Test2 ok!" << std::endl;
    } else {
        std::cout << "Test2 failed! input: \"bbbbb\", output expected 1, actual " << ret << std::endl;
    }
}

void Test3() {
    int ret = Solution().lengthOfLongestSubstring("pwwkew");
    if (ret == 3) {
        std::cout << "Test3 ok!" << std::endl;
    } else {
        std::cout << "Test3 failed! input: \"pwwkew\", output expected 3, actual " << ret << std::endl;
    }
}

void Test4() {
    int ret = Solution().lengthOfLongestSubstring("");
    if (ret == 0) {
        std::cout << "Test4 ok!" << std::endl;
    } else {
        std::cout << "Test4 failed! input: \"\", output expected 0, actual " << ret << std::endl;
    }
}

void Test5() {
    int ret = Solution().lengthOfLongestSubstring("dvdf");
    if (ret == 3) {
        std::cout << "Test5 ok!" << std::endl;
    } else {
        std::cout << "Test5 failed! input: \"dvdf\", output expected 3, actual " << ret << std::endl;
    }
}

int main() {
    Test1();
    Test2();
    Test3();
    Test4();
    Test5();
    return 0;
}
